// Copyright 2008 Senary
// See credits.txt for details.

// This file is part of Omega VII.

// Omega VII is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Omega VII is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Omega VII.  If not, see <http://www.gnu.org/licenses/>.

#pragma once

#include <vector>

enum SfxType {
	SFXT_OPEN_FIRE,
	SFXT_METHI_FIRE,
	SFXT_RECEIVE_DAMAGE,
	SFXT_SMOKE,
	SFXT_SMOKE_OFF,
	SFXT_TRAIL,

	SFXT_NUMSFXTYPES
};

class ObjectEffectInfo
{
private:
	
	// start times of all effects
	// zero if the effect has not been started
	std::vector<float> _effectStartTimes;

public:
	ObjectEffectInfo(void);
	~ObjectEffectInfo(void);

	// registers a special effect.
	// Returns true if the effect is allowed to start, false otherwise
	bool startEffect(SfxType effectType, float totalTime);

	// resets a special effect
	void resetEffect(SfxType effectType);

	// Returns the duration of a given effect
	float effectDuration(SfxType effectType);

};
